<?php

namespace App\Model;

class GoodsModel extends BaseModel
{
    protected $table = 'goods';
    protected $primaryKey = 'goods_id';
    protected $fillable = [
        'goods_name',
        'goods_img_cover',
        'goods_price',
        'score_send',
        'max_recive',
        'origin_price',
        'goods_desc',
        'content_value',
        'mix_goods_price',
        'send_vip',
        'show',
        'goods_sort',
        'category_id'
    ];

    public function categoryInfo(): \Illuminate\Database\Eloquent\Relations\HasOne
    {
        return $this->hasOne(CategoryModel::class,'category_id','category_id');
    }
}
